function() {
// If we're just starting out, start on the right
// item.
- if (!this.is_loaded) {
+ if (!this._userManager.is_loaded) {
this._userList.jumpToItem(this._timedLoginItem);
}
},
Lang.bind(this, function(userManager, user) {
this._userList.removeUser(user);
}));
-
- // emitted in idle so caller doesn't have to explicitly check if
- // it's loaded immediately after construction
- // (since there's no way the caller could be listening for
- // 'loaded' yet)
- Mainloop.idle_add(Lang.bind(this, function() {
- this.emit('loaded');
- this.is_loaded = true;
- }));
},
_onOpened: function() {
let time = global.get_current_time();
- this._dialog.connect('loaded', Lang.bind(this, function() {
- if (!this._dialog.open(time, onPrimary)) {
- // This is kind of an impossible error: we're already modal
- // by the time we reach this...
- log('Could not open login dialog: failed to acquire grab');
- this.deactivate(true);
- }
- }));
+ if (!this._dialog.open(time, onPrimary)) {
+ // This is kind of an impossible error: we're already modal
+ // by the time we reach this...
+ log('Could not open login dialog: failed to acquire grab');
+ this.deactivate(true);
+ }
this._dialog.connect('failed', Lang.bind(this, this._onUnlockFailed));
this._dialog.connect('unlocked', Lang.bind(this, this._onUnlockSucceded));
let batch = new Batch.Hold();
this._userVerifier.begin(this._userName, batch);
- GLib.idle_add(GLib.PRIORITY_DEFAULT, Lang.bind(this, function() {
- this.emit('loaded');
- return false;
- }));
-
Main.ctrlAltTabManager.addGroup(this.dialogLayout, _("Unlock Window"), 'dialog-password-symbolic');
this._idleMonitor = new GnomeDesktop.IdleMonitor();